package com.mmo.cq.game.script.proto.login.controller;

import com.alibaba.fastjson.JSONObject;
import com.mmo.cq.game.script.proto.login.message.ReqLogin;
import com.mmo.cq.game.script.proto.login.message.ResLogin;
import com.mmo.cq.game.server.bean.user.UserInfo;
import lombok.extern.slf4j.Slf4j;
import org.wxd.net.SocketSession;
import org.wxd.net.controller.IController;
import org.wxd.net.controller.MessageController;
import org.wxd.net.controller.ann.ProtoController;
import org.wxd.net.controller.ann.ProtoMapping;

/**
 * 登录消息 file=Login.proto
 *
 * @author: Troy.Chen(無心道, 15388152619)
 * @version: 2023/02/09 20:21:08
 */
@Slf4j
@ProtoController(service = "org.wxd.net.web.ws.WebSocketServer")
public final class ReqLoginController implements IController {

    /** 登录消息 ReqLogin */
    @ProtoMapping(remarks = "登录消息")
    public void exec(ReqLogin reqMessage, JSONObject param, SocketSession session) throws Exception {
        UserInfo userInfo = (UserInfo) param.get(MessageController.OBJ_Player);
        ResLogin.Builder res4Builder = ResLogin.newBuilder();
    }
}
